package indi.zhifa.study2024.nbr.monitor.gen.monitor.sys.po;

import com.alibaba.fastjson2.annotation.JSONField;
import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import indi.zhifa.core.mpenhance.entity.po.PureBaseEntity;
import indi.zhifa.study2024.common.auth.enums.EDataSourceType;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.time.LocalDateTime;

/**
 * <p>
 * 数据库表
 * </p>
 *
 * @author 织法
 * @since 2024-11-02
 */
@Data
@TableName("sys_db")
@Schema(title = "GenMonitorSysDbEntity对象", description = "数据库表")
public class GenMonitorSysDbEntity extends PureBaseEntity {

    private String profile;

    private String datasourceGroup;

    @Schema(title = "0是Single，1是multiple")
    private EDataSourceType datasourceType;

    @TableField(value = "`primary`")
    @Schema(title = "是否是首选")
    private Boolean primary;

    @Schema(title = "数据库标识")
    private String dbKey;

    @Schema(title = "数据库链接")
    private String dbUrl;

    @Schema(title = "数据库用户名")
    private String dbUser;

    @Schema(title = "数据库密码")
    private String dbPasswd;

    @Schema(title = "连接池最小连接数")
    private Integer minIdle;

    @Schema(title = "连接池最大连接数")
    private Integer maxPoolSize;

    @Schema(title = "驱动")
    private String driver;

    @JSONField(serialize = false, deserialize = false)
    @TableField(fill = FieldFill.INSERT)
    @Schema(title = "创建时间")
    protected LocalDateTime createTime;
    @JSONField(serialize = false, deserialize = false)
    @TableField(fill = FieldFill.UPDATE)
    @Schema(title = "修改时间")
    protected LocalDateTime modifyTime;


}
